package cn.starlightsoftware.sherly.controller.admin.permission.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import cn.starlightsoftware.sherly.enums.BooleanEnum;
import cn.starlightsoftware.sherly.enums.PermissionTypeEnum;
import cn.starlightsoftware.sherly.enums.UsableEnum;

import javax.validation.constraints.NotBlank;

/**
 * @author 谷子毅
 */
@Data
public class PermissionSaveReqVO {

    @Schema(description = "权限编号", example = "1")
    private String permissionId;

    @Schema(description = "父权限编号", example = "0")
    private String parentId;

    @Schema(description = "权限名称", example = "用户新增")
    @NotBlank
    private String permissionName;

    @Schema(description = "权限代码，仅权限类型为MENU或BUTTON时才传", example = "system:user:page")
    private String permissionCode;

    @Schema(description = "图标，仅权限类型为DIR或MENU时才传", example = "USER-ICON")
    private String icon;

    @Schema(description = "组件地址，仅权限类型为DIR或MENU时才传", example = "system/user/index")
    private String componentPath;

    @Schema(description = "组件名称", example = "SystemUser")
    private String componentName;

    @Schema(description = "路由地址，仅权限类型为MENU时才传", example = "user")
    private String path;

    @Schema(description = "排序", example = "1")
    private Integer sort;

    @Schema(description = "权限类型", example = "DIR")
    private PermissionTypeEnum permissionType;

    @Schema(description = "可用性", example = "ENABLE")
    private UsableEnum usable;

    @Schema(description = "显示状态", example = "TRUE")
    private BooleanEnum visible;

    @Schema(description = "总是显示", example = "TRUE")
    private BooleanEnum alwaysShow;

    @Schema(description = "缓存状态", example = "TRUE")
    private BooleanEnum keepAlive;

}
